#! /usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jmz

from threading import *

x = 0
def test():
	global x
	x += 1
	print(x)


# 线程是按照顺序切的。
if __name__ == '__main__':
	t_l = []
	for i in range(40):
		t = Thread(target=test)
		t.start()
		t_l.append(t)

	for t in t_l:
		t.join()